package com.ruoyi.jypc.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.jypc.mapper.Tb1SpecdirectMapper;
import com.ruoyi.jypc.domain.Tb1Specdirect;
import com.ruoyi.jypc.service.ITb1SpecdirectService;

/**
 * 专业方向Service业务层处理
 * 
 * @author xymc
 * @date 2022-11-14
 */
@Service
public class Tb1SpecdirectServiceImpl implements ITb1SpecdirectService 
{
    @Autowired
    private Tb1SpecdirectMapper tb1SpecdirectMapper;

    /**
     * 查询专业方向
     * 
     * @param sdId 专业方向主键
     * @return 专业方向
     */
    @Override
    public Tb1Specdirect selectTb1SpecdirectBySdId(Long sdId)
    {
        return tb1SpecdirectMapper.selectTb1SpecdirectBySdId(sdId);
    }

    /**
     * 查询专业方向列表
     * 
     * @param tb1Specdirect 专业方向
     * @return 专业方向
     */
    @Override
    public List<Tb1Specdirect> selectTb1SpecdirectList(Tb1Specdirect tb1Specdirect)
    {
        return tb1SpecdirectMapper.selectTb1SpecdirectList(tb1Specdirect);
    }

    /**
     * 新增专业方向
     * 
     * @param tb1Specdirect 专业方向
     * @return 结果
     */
    @Override
    public int insertTb1Specdirect(Tb1Specdirect tb1Specdirect)
    {
        tb1Specdirect.setCreateTime(DateUtils.getNowDate());
        return tb1SpecdirectMapper.insertTb1Specdirect(tb1Specdirect);
    }

    /**
     * 修改专业方向
     * 
     * @param tb1Specdirect 专业方向
     * @return 结果
     */
    @Override
    public int updateTb1Specdirect(Tb1Specdirect tb1Specdirect)
    {
        tb1Specdirect.setUpdateTime(DateUtils.getNowDate());
        return tb1SpecdirectMapper.updateTb1Specdirect(tb1Specdirect);
    }

    /**
     * 批量删除专业方向
     * 
     * @param sdIds 需要删除的专业方向主键
     * @return 结果
     */
    @Override
    public int deleteTb1SpecdirectBySdIds(Long[] sdIds)
    {
        return tb1SpecdirectMapper.deleteTb1SpecdirectBySdIds(sdIds);
    }

    /**
     * 删除专业方向信息
     * 
     * @param sdId 专业方向主键
     * @return 结果
     */
    @Override
    public int deleteTb1SpecdirectBySdId(Long sdId)
    {
        return tb1SpecdirectMapper.deleteTb1SpecdirectBySdId(sdId);
    }
}
